-- GENERATED SPELL FOR [Shadow Adept] --


function spell0_31145(pUnit, Event) --@Drain Life,Drain--
pUnit:FullCastSpellOnTarget(17238,pUnit:GetRandomPlayer(0))
pUnit:RegisterEvent('Sorts_31145', 5000, 1)
end

function spell1_31145(pUnit, Event) --@Shadow Blast,n/a--
pUnit:FullCastSpellOnTarget(60646,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31145', 2500, 1)
end

function Sorts_31145(pUnit, Event)
local choix_sorts_31145 = math.random(0, 1)
if choix_sorts_31145 == 0 then
pUnit:RegisterEvent('spell0_31145', 1, 1)
end
if choix_sorts_31145 == 1 then
pUnit:RegisterEvent('spell1_31145', 1, 1)
end
end

function mob31145_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31145', math.random(1500, 3000), 1)
end

function mob31145_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31145_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31145_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31145, 1, 'mob31145_Action')
RegisterUnitEvent(31145, 2, 'mob31145_Leave')
RegisterUnitEvent(31145, 3, 'mob31145_Kill')
RegisterUnitEvent(31145, 4, 'mob31145_Die')
